Added PathElement
[brmtron.git] / BrmTron Server / src / cz / brmlab / brmtron / server / Player.java
blobb1e33395803810b963eaaefbe8a32d8fd7700d6b
1 package cz.brmlab.brmtron.server;
3 public class Player {
5 private double longitude = 0;
6 private double latitude = 0;
7 private double[] prevCoords = new double[2];
8 private boolean active = false;
10 public Player() {
14 public void setLongitude(double longitude) {
15 this.longitude = longitude;
18 public double getLatitude() {
19 return latitude;
22 public void setLatitude(double latitude) {
23 this.latitude = latitude;
26 public boolean isActive() {
27 return active;
30 public void setActive(boolean active) {
31 this.active = active;
34 public double getLongitude() {
35 return longitude;
38 public double[] getCoords(){
39 double[] ret = new double[2];
40 ret[0] = getLongitude();
41 ret[1] = getLatitude();
42 return ret;
45 public void setCoords(double[] coords) {
46 this.setPrevCoords(longitude, latitude);
47 this.longitude = coords[0];
48 this.latitude = coords[1];
51 public void setPrevCoords(double x, double y) {
52 this.prevCoords[0] = x;
53 this.prevCoords[1] = y;